<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script src="../js/jquery.min.js"></script>

    <script>

        $.ajax({
            url: 'http://localhost/wh2212/day26/%e8%af%be%e5%a0%82%e4%bb%a3%e7%a0%81/php/06login.php',
            type: 'get',
            data: {
                username: 'yy',
                password: '123'
            },
            dataType: 'json',
            beforeSend: () => {
                console.log('请求之前执行')
            },
            success: res => {
                console.log(res)
            }
        })

    </script>

</body>

</html>